import request from '@/utils/request'

// 查询OA同步星空映射列表
export function listMapping(query) {
  return request({
    url: '/datafactory/mapping/list',
    method: 'get',
    params: query
  })
}
// 查询OA同步星空映射详细
export function getMapping(id) {
  return request({
    url: '/datafactory/mapping/' + id,
    method: 'get'
  })
}

// 新增OA同步星空映射
export function addMapping(data) {
  return request({
    url: '/datafactory/mapping',
    method: 'post',
    data: data
  })
}

// 修改OA同步星空映射
export function updateMapping(data) {
  return request({
    url: '/datafactory/mapping',
    method: 'put',
    data: data
  })
}

// 删除OA同步星空映射
export function delMapping(id) {
  return request({
    url: '/datafactory/mapping/' + id,
    method: 'delete'
  })
}
// 启动或禁用作业
export function updateUseStatus(workIds , status) {
  return request({
    url: '/datafactory/mapping/updateUseStatus?workIds=' + workIds + '&' + 'status=' + status,
    method: 'get'
  })
}
